<template>
  <view class="bigBox">
    <view class="ifgoodsBox">
      <view class="goods_item" @click="goTools('BMI计算')">
        <img src="@/static/images/indexImg/bmi.png" class="goods_img" alt="">
        <view class="goods_particulars">
          {{ " BMI计算" }}
        </view>
       
      </view>
      <view class="goods_item" @click="goTools('血型预测')">
        <img src="@/static/images/indexImg/blood.png" class="goods_img" alt="">
        <view class="goods_particulars">
          {{ " 血型预算" }}
        </view>
       
      </view>
      <view class="goods_item" @click="goTools('驾考成绩模拟')">
        <img src="@/static/images/indexImg/jiazhao.png" class="goods_img" alt="">
        <view class="goods_particulars">
          {{ " 驾考成绩模拟" }}
        </view>
       
      </view>
      <view class="goods_item" @click="goLottery">
        <img src="@/static/images/indexImg/choujiang.png" class="goods_img" alt="">
        <view class="goods_particulars">
          {{ " 轮盘抽奖" }}
        </view>
       
      </view>
      <view class="goods_item" @click="goCreateQr">
        <img src="@/static/images/indexImg/erweima.png" class="goods_img" alt="">
        <view class="goods_particulars">
          {{ " 自定义二维码" }}
        </view>
       
      </view>
	  <view class="goods_item" @click="goScanCode">
	    <img src="@/static/images/indexImg/saoma.png" class="goods_img" alt="">
	    <view class="goods_particulars">
	      {{ " 识别WIFI密码" }}
	    </view>
	   
	  </view>
     <view class="goods_item" @click="goCodeing">
        <img src="@/static/images/indexImg/coding.png" class="goods_img" alt="">
        <view class="goods_particulars">
          {{ " 开发中…" }}
        </view>
       
      </view>
    </view>
  </view>
</template>


<script>
export default {
  data() {
    return {};
  },
  methods: {
	  goCodeing(){
	    uni.navigateTo({ url: "/subpage/weather/index" });
		},
    goScanCode(){
      uni.navigateTo({ url: "/subpage/scancode/index" });
	 
    },
    goCreateQr(){
      uni.navigateTo({ url: "/subpage/qrcode/index" });
    },
    goLottery(){
      uni.navigateTo({ url: "/subpage/lottery/index" });
    },
    goTools(type) {
      console.log(type);
      if (type == "驾考成绩模拟") {
        uni.navigateTo({ url: "/subpage/jiakaoInfo/jiakaoIndex" });
      } else {
        uni.navigateTo({
          url: "/subpage/articleInfo/articleInfo?toolType=" + type,
        });
      }
    },
  },
  onLoad() {},
  onShow() {
    // this.$store
    //   .dispatch("SetPermissions")
    //   .then((result) => {
    //     console.log(this.$auth.hasPermi("biz:questionnaire:update"));
    //     console.log(this.$auth.hasRole("a123"));
    //   })
    //   .catch((err) => {});
  },
};
</script>

<style lang="scss" scoped>
/* From Uiverse.io by joe-watson-sbf */
.bigBox {
  // height: 100vh;
  padding: 30rpx 30rpx;
  background: #f5f5f5;
  // display: flex;
  .ifgoodsBox {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;

    .goods_item {
      width: 334rpx;

      margin-bottom: 24rpx;
      box-shadow: rgba(50, 50, 93, 0.25) 0px 6rpx 6rpx -2rpx,
        rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
      border-radius: 15rpx;
      background-color: white;

      .goods_img {
        width: 334rpx;
        height: 334rpx;
        background-size: cover;
        background-repeat: no-repeat;

        border-radius: 15rpx;
      }

   

      .goods_particulars {
        padding: 22rpx 22rpx;
        text-align: center;
      }
    }
  }

  .card {
    height: 400rpx;
    padding: 50rpx;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
  }
}
</style>